﻿CREATE PROCEDURE GetProductReviews
	@productId int,
	@getOnlyAprovedReviews bit = 1
AS
begin
SET NOCOUNT ON
	if (@getOnlyAprovedReviews = 1)
	begin
		Select * From ProductReviews where ProductId = @productId and IsAproved = 1
	end
	else
	begin
		Select * From ProductReviews where ProductId = @productId
	end
end


